import { useEffect, useState } from "react";

export function useTitle(init: string) {
  const [title, setTitle] = useState(init);

  useEffect(() => {
    document.title = title
  }, [title])


  return { title, setTitle }
}